package com.zhang.facade.example;

import org.omg.CORBA.PolicyError;

/**
 * @author ElloeStudy(Sifa Zhang)
 * @create 2022-03-02 18:09
 * To: 真常应物，真常得性，常清常静，常清静矣
 */
public class ModenPostOffice1 {
    // 对送往某个地方的文件需要进行检查
    private LetterProcess letterProcess = new LetterProcessImpl();
    private Police letterPolice = new Police();

    public void sendLetter(String context , String address){
        letterProcess.writeContext(context);
        letterProcess.fillEnvelope(address);
        // 信检察员对即将需要发送的信件进行检查
        letterPolice.checkLetter(letterProcess);

        letterProcess.letterInotoEnvelope();
        letterProcess.sendLetter();
    }

}
